function a(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            console.log('aaa');
            resolve()
        },1000)
    })

}

function b(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            console.log('bbb');
            resolve()
        },800)
    })

}

function c(){
    setTimeout(()=>{
        console.log('ccc');
    },400)
}

// a().then(b).then(c)
// Promise.all([a(),b()]).then(c)
Promise.race([a(),b()]).then(c)